//
//  MFriendTicketModel.m
//  NeusoftHBSJSober
//
//  Created by Apple-21 on 15/11/11.
//  Copyright (c) 2015年 com.neusoftsober. All rights reserved.
//

#import "MFriendTicketModel.h"

@implementation MFriendTicketModel

@end
@implementation MFriendTicketHttpResult

- (id)getFriendListWithArray:(NSArray *)array {

    NSMutableArray *data = [NSMutableArray array];
    for (NSDictionary *dict in array) {
        [data addObject:[self getFriendListWithDictionary:dict]];
    }
    return data;
}

- (id)getFriendListWithDictionary:(NSDictionary *)dict {

    if (dict) {
        MFriendTicketModel *model = [[MFriendTicketModel alloc]init];
        
        model.codeID = [((NSNumber *)dict[@"CodeID"])stringValue];
        model.friendUserID = [((NSNumber *)dict[@"FriendUserID"])stringValue];
        model.originalMoney = [((NSNumber *)dict[@"OriginalMoney"])stringValue];
        model.saleman = (dict[@"SaleMan"] == [NSNull null]) ? @"" :dict[@"SaleMan"];
        model.active = (dict[@"Active"] == [NSNull null]) ? @"" :dict[@"Active"];
        model.friendName = (dict[@"FriendName"] == [NSNull null]) ? @"" :dict[@"FriendName"];
        model.salemanUserID = [((NSNumber *)dict[@"SaleManUserID"])stringValue];
        model.fee = [((NSNumber *)dict[@"Fee"])stringValue];
        model.count = [((NSNumber *)dict[@"Count"])stringValue];
        model.useCount= [((NSNumber *)dict[@"UserCount"])stringValue];
        model.money = [((NSNumber *)dict[@"Money"])stringValue];
        return model;
    }
    return nil;
}

@end